<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:if test="${code==1}">
	<form id="pagerForm" method="post"
		action="applyinvoiceAction.action?toResult=serachApplyinvoice&rightId=${rightId}">
		<input type="hidden" name="pageNum" value="${page.currentPage }" />
		<input type="hidden" name="pageSize" value="${page.pageSize }" /> 
		<input type="hidden" name="id" value="${id}" /> 
		<input type="hidden" name="payId" value="${payId}" /> 
		<input type="hidden" name="applayMoney" value="${applayMoney}" /> 
		<input type="hidden" name="companyName" value="${companyName}" />
		<input type="hidden" name="sendAddress" value="${sendAddress}" /> 
		<input type="hidden" name="receiverName" value="${receiverName}" /> 
		<input type="hidden" name="receiverMobile" value="${receiverMobile}" /> 
		<input type="hidden" name="createTime" value="${createTime}" />
		<input type="hidden" name="checkStatus" value="${checkStatus}" />
	</form>

	<form onsubmit="return navTabSearch(this);"
		action="applyinvoiceAction.action?toResult=serachApplyinvoice&rightId=${rightId}"
		method="post">
		<div class="pageHeader">
			<input type="hidden" name="init" value=0>
		</div>

		<table class="searchContent">
			<tr>
				<td>充值记录: <input type="text" name="payId" value="${payId}"
					style="width: 100px;" />
				</td>
				<td>电话: <input type="text" name="receiverMobile"
					value="${receiverMobile}" style="width: 100px;" />
				</td>
				<td>是否处理: <select name="checkStatus" id="checkStatus_id">
						<option value="0"
							<s:if test="#request.checkStatus==0">selected="selected"</s:if>>审核失败</option>
						<option value="1"
							<s:if test="#request.checkStatus==1">selected="selected"</s:if>>审核通过</option>
						<option value="2"
							<s:if test="#request.checkStatus==2">selected="selected"</s:if>>未审核</option>
						<option value="3"
							<s:if test="#request.checkStatus==3">selected="selected"</s:if>>全部</option>
				</select>
				</td>

				<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

				<td>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">检索</button>
						</div>
					</div>
				</td>
			</tr>
		</table>


		<div class="pageContent">
			<div class="panelBar">
				<ul class="toolBar">
					<c:forEach items="${righSubtList}" var="rightsub">
						<%-- 				<!-- 添加  -->
						<c:if test="${fn:contains(rightsub.rightValue,'addRegInfo')}">
							<li><a class="add" href="${rightsub.rightValue}&rightId=${rightId}" target="navTab"><span>${rightsub.rightName}</span> </a></li>
							<li class="line">line</li>
						</c:if> --%>
						<!-- 修改 -->
						<c:if test="${fn:contains(rightsub.rightValue,'updateRegInfo')}">
							<li><a class="edit"
								href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}"
								target="navTab"><span>${rightsub.rightName}</span> </a></li>
							<li class="line">line</li>
						</c:if>
						<!-- 删除 -->
						<c:if test="${fn:contains(rightsub.rightValue,'deleteRegInfo')}">
							<li><a class="delete"
								href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}"
								target="ajaxTodo" title="确认要删除吗？"><span>${rightsub.rightName}</span>
							</a></li>
							<li class="line">line</li>
						</c:if>
						<!-- 审核 -->
						<c:if
							test="${fn:contains(rightsub.rightValue,'checkApplyinvoice')}">
							<li><a class="edit"
								href="${rightsub.rightValue}&supportID={sid_support}&rightId=${rightId}"
								target="navTab"><span>${rightsub.rightName}</span> </a></li>
							<li class="line">line</li>
						</c:if>
					</c:forEach>
				</ul>
			</div>
			<table class="list" width="100%" layoutH="138">
				<thead>
					<tr>
						<th align="center">序号</th>
						<th align="center">充值记录</th>
						<th align="center">充值金额</th>
						<th align="center">审核状态</th>
						<th align="center">发票抬头</th>
						<th align="center">发票邮寄地址</th>
						<th align="center">收件人姓名</th>
						<th align="center">收件人电话</th>
						<th align="center">创建时间</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator var="applyinvoice" value="page.data" status="st">
						<tr target="sid_support"
							rel="<s:property value="#applyinvoice.id" />">
							<th width="1%" align="center"><s:property
									value="page.pageSize * (page.currentPage-1) + #st.index + 1" /></th>
							<th width="3%" align="center"><s:property
									value="#applyinvoice.payId" /></th>
							<th width="5%" align="center"><s:property
									value="#applyinvoice.applayMoney" /></th>
							<th width="5%" align="center"><s:if
									test="#request.applyinvoice.checkStatus==0">
									<span>审核失败</span>
								</s:if> <s:elseif test="#request.applyinvoice.checkStatus==1">
									<span style="color: blue">审核通过</span>
								</s:elseif> <s:elseif test="#request.applyinvoice.checkStatus==2">
									<span style="color: red">未审核</span>
								</s:elseif></th>
							<th width="7%" align="center"><s:property
									value="#applyinvoice.companyName" /></th>
							<th width="9%" align="center"><s:property
									value="#applyinvoice.sendAddress" /></th>
							<th width="9%" align="center"><s:property
									value="#applyinvoice.receiverName" /></th>
							<th width="5%" align="center"><s:property
									value="#applyinvoice.receiverMobile" /></th>
							<th width="5%" align="center"><s:date
									name="#applyinvoice.createTime" format="yyyy-MM-dd HH:mm:ss" /></th>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<div class="panelBar">
				<div class="pages">
					<span>共${page.totalNum }条，共${page.totalPage }页</span>
				</div>
				<div class="pagination" targetType="navTab"
					totalCount="${page.totalNum }" numPerPage="${page.pageSize }"
					pageNumShown="10" currentPage="${page.currentPage }"></div>
				</div>
			</div>
	</form>
</c:if>
<c:if test="${code==0}">
	${message}
</c:if>